package com.zy.kotlinmvplib

import android.os.Bundle
import com.zy.kotlinbaselibrary.base.activity.BasePresenterActivity
import com.zy.kotlinbaselibrary.log.XLog
import kotlinx.android.synthetic.main.activity_main.*





class MainActivity: BasePresenterActivity<MainContract.View, MainPresenter>(), MainContract.View {
    override fun show(result: String) {
        XLog.i("这是几：$result")
    }

    override fun showResult() {

    }

    override fun createPresenter(): MainPresenter =  MainPresenter()

    override fun getLayoutId(savedInstanceState: Bundle?): Int = R.layout.activity_main

    override fun initData() {

//        val refWatcher = MyApplication.instance.getRefWatcher(this)
//        refWatcher.watch(this)

    }

    override fun initEvent() {
        tv.setOnClickListener {
//            mPresenter.goData()
            mPresenter.goData1()
        }
        tv2.setOnClickListener {
            mPresenter.testRxJava()
        }
    }




}
